#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(){

	pid_t pid;
	int data = 10;

	while(1){
			
		printf("please input a data:\n");
		scanf("%d",&data);

		if(data == 1){
			
			pid = fork();
			
			if(pid == 0){
					
				printf("this pro get system date:\n");
	
  				if(execl("//mnt/hgfs/linux/progress_program/changeConfig","changeConfig","TEST.config",NULL) == -1){
      						
				      	printf("execl failed!\n");      
					perror("why");
				}
   					 printf("after execl\n");	
			}
			else if(pid > 0){
				
			}
		}
		else{
			printf("waiting ...\n");
		}
	}

	return 0;
}
